package com.jiangjiang.eshop.auth.convert;

import com.jiangjiang.eshop.auth.dto.PriorityDTO;
import com.jiangjiang.eshop.auth.dto.PrioritySaveDTO;
import com.jiangjiang.eshop.auth.domain.PriorityEntity;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @ClassName PriorityConvert
 * @Description TODO
 * @Author jhw
 * @Date 2021/4/20 22:56
 * @Version 1.0
 **/

@Mapper(componentModel = "spring")
public interface PriorityConvert {

    /**
     * DTO 转化为 entity
     * @param dto
     * @return
     */
    PriorityEntity prioritySaveDtoConvert2Entity(PrioritySaveDTO dto);

    /**
     * PriorityEntity 转化为  PriorityDTO
     * @param entity
     * @return
     */
    PriorityDTO convertEntities2DTO(PriorityEntity entity);

    /**
     * PriorityEntity 集合转化为  PriorityDTO 集合
     * @param priorityEntities
     * @return
     */
    List<PriorityDTO> convertEntities2DTOList(List<PriorityEntity> priorityEntities);
}
